package com.example.HeadFirstDemo.Singleton;

public class SingletonDemo3 {
    public static SingletonDemo3 getInstance(){
        return SingletomHolder.singletonDemo3;
    }
    //私有化构造函数
    private SingletonDemo3(){

    }
    public static class SingletomHolder{
        private static SingletonDemo3 singletonDemo3=new SingletonDemo3();
    }
}
